package com.hsgene.consumables.constant;

/**
 * 地服耗材申领状态
 *
 * @author wangbing
 * @version 1.0, 2018/9/17
 */
public enum GoodsApplyStatus {

    /**
     * 待审批
     */
    WAIT_AUDIT(1, "待审核"),

    /**
     * 待修改
     */
    WAIT_MODIFY(2, "待修改"),

    /**
     * 待寄送
     */
    WAIT_SEND(3, "待寄送"),

    /**
     * 待签收
     */
    WAIT_SIGN(4, "待签收"),

    /**
     * 已完成
     */
    FINISHED(5, "已完成"),

    /**
     * 未知状态
     */
    UNDEFINED(-1, "未知状态");

    GoodsApplyStatus(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static GoodsApplyStatus getEnum(int code) {
        for (GoodsApplyStatus status : values()) {
            if (status.status == code) {
                return status;
            }
        }
        return UNDEFINED;
    }

    private int status;
    private String desc;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
